@import 'config';
// 颜色变量定义补充
$white-grey: #F9F9FA;
$lineColor: #E8E9EA;
$green-light: #E5FAF1;
$blackish-green:#002E00;
$red-light: rgba(255, 126, 104, 0.1);
$yellow-light: rgba(255, 199, 104, 0.1);
$grey-light: rgba(148, 151, 177, 0.3);
$orange:#FF7642;

// 基础mixin
@mixin padding-box($padding: 30rpx) {
  padding: $padding;
  box-sizing: border-box;
}

@mixin item-box {
  @include padding-box;
  width: $block;
  background-color: white;
  margin: 0 auto;
}

@mixin space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@mixin flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}
@mixin line-height($height){
  height: $height;
  line-height: $height;
}

// button基础格式化
@mixin button {
  @include clear-btn;
  font-weight: 400;
  color: white;
  font-size: 24rpx;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

@mixin clear-btn{
  &::after{
    content: unset;
  }
}

// 圆形图片
@mixin roundImage($width){
  width: $width;
  height: $width;
  border-radius: $width;
}

// 按钮组
@mixin btn-group($color: $green) {
  width: $block;
  display: flex;
  justify-content: center;

  .btn:not([size=mini]) {
    @include button;
    font-size: $font-normal;
    background-color: transparent;
    border: $color 2rpx solid;
    color: $color;
    height: 88rpx;
    border-radius: 88rpx 0 0 88rpx;

    &:last-child {
      border-radius: 0 88rpx 88rpx 0;
    }

    &.active {
      background-color: $color;
      color: white;
    }
  }
}

// 组件mixin
// tabbar
@mixin tabbar {
  .tab-bar {
    background-color: white;
    display: flex;
    height: 112rpx;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid $lineColor;
    position: relative;
  }

  .tab {
    width: 50%;
    text-align: center;
    color: $grey;
  }

  .tab-text {
    position: relative;
    z-index: 2;
  }

  .tab.active {
    color: $black;
    font-weight: 600;
  }

  .tab.active::after {
    content: '';
    display: block;
    width: 128rpx;
    height: 16rpx;
    background: $green;
    position: absolute;
    margin-left: 124rpx;
    bottom: 34rpx;
    z-index: 1;
  }

  .line {
    width: 2rpx;
    height: 48rpx;
    background: $lineColor;
  }
}

// input
@mixin popup-input {
  .popup-input-block {
    @include space-between;
    width: 590rpx;
    height: 88rpx;
    background: $white;
    border-radius: 8rpx;
    font-size: $font-normal;
    padding: 0 40rpx;
    box-sizing: border-box;
    margin-top: 20rpx;
    position: relative;
  }
  .popup-text {
    flex-shrink: 0;
  }
  .popup-input {
    width: 100%;
    font-size: $font-normal;
  }
  .popup-input.sign {
    padding-right: 20rpx;
  }
  .popup-input-pl {
    color: $grey;
  }

  .short-btn {
    margin-top: 50rpx !important;
  }

  .popup-input-sign {
    position: absolute;
    right: 30rpx;
    z-index: 10;
    &.triangle{
      top: 36rpx;
    }
    &.arrow{
      width: 40rpx;
      height: 40rpx;
      top: 24rpx;
      right: 24rpx;
    }
  }
  
  .popup-textarea-block {
    position: relative;
    height: auto;
    align-items: flex-start;
    padding-top: 20rpx;
  }

  .btn-group {
    margin-top: 30rpx;
  }
}

// 下拉框
@mixin tip {
  .tip {
    position: absolute;
    width: 100%;
    max-height: 60vw;
    overflow: auto;
    top: 16vw;
    right: 0;
    z-index: 1000;
    background: $white;
    border-radius: 16rpx;
    font-size: 28rpx;
  }
  .tip-li {
    padding: 3.6vw 8vw 4vw;
  }
  .tip-li:hover,.tip-li.active {
    background: #E9EEF9;
    color: $green;
  }
  .tip.worker-search-tip {
    position: absolute;
    width: 30vw;
    max-height: 60vw;
    overflow: auto;
    top: 13vw;
    left: 0;
    z-index: 1037;
    background: $white;
    border-radius: 16rpx;
  }
  .tip.worker-search-tip .tip-li {
    padding: 3.6vw 5vw 2vw;
  }
}

// 邀请码邀请和海报邀请的头部邀请流程
@mixin guide-process {

  .guide {
    height: 300rpx;
    margin: 0 auto;
    border-bottom: 1px dashed #E8E9EA;
    padding: 0 50rpx;
  }

  .guide-title {
    font-size: 36rpx;
    font-weight: 600;
    color: #202536;
    text-align: center;
    padding-top: 50rpx;
  }

  .guide-process {
    display: flex;
    justify-content: space-between;
    margin-top: 40rpx;
    position: relative;
  }

  .guide-line {
    border-bottom: 1rpx dashed $green;
    height: 0rpx;
    width: 420rpx;
    position: absolute;
    left: 90rpx;
    top: 17rpx;
  }

  .guide-process-li {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 144rpx;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
  }

  .guide-circular {
    width: 40rpx;
    height: 40rpx;
    border-radius: 40rpx;
    line-height: 40rpx;
    text-align: center;
    color: white;
    background: $green;
  }

  .guide-describe {
    margin-top: 12rpx;
    text-align: center;
    font-size: 24rpx;
  }

}

.disabled{
    filter: grayscale(0.95);
}